package com.xiaoka.ins.corp.api.gpic.dto;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.http.client.utils.DateUtils;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "Header")
@XmlType(name = "", propOrder = {
        "Version",
        "RequestType",
        "InsureType",
        "SessionId",
        "SellerId",
        "FlagType",
        "NeedType",
        "SendTime",
        "Status",
        "ErrorMessage",
    })
public class HeaderElementGPIC {

	// 报文版本
	@XmlElement(required = true)
	protected String Version;

	// 请求接口类型
	@XmlElement(required = true)
	protected Integer RequestType;

	// 投保类型
	@XmlElement(required = true)
	protected String InsureType;
	
	@XmlElement(required = true)
	protected String NeedType;

	// 唯一标识
	@XmlElement(required = true)
	protected String SessionId;

	// 第三方标识
	@XmlElement(required = true)
	protected String SellerId;

	// 发送时间
	@XmlElement(required = true)
	protected String SendTime;
	
	// 发送时间
	@XmlElement(required = true)
	protected String FlagType;

	// 状态
	@XmlElement(required = true)
	protected String Status;
	
	@XmlElement
	protected String ErrorMessage;
	
	public HeaderElementGPIC(){}
	
	public HeaderElementGPIC(Integer requestType,String sessionId){
		this.Version="2";
		this.RequestType=requestType;
		this.InsureType="100";
		this.SessionId= sessionId;
		this.SendTime=DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss");
		this.Status="100";
		this.ErrorMessage = "";
		this.NeedType="no";
		this.FlagType="web";
	}
	
	public String getNeedType() {
		return NeedType;
	}

	public void setNeedType(String needType) {
		NeedType = needType;
	}

	public void setVersion(String version) {
		this.Version = version;
	}

	public void setRequestType(Integer requestType) {
		this.RequestType = requestType;
	}

	public void setInsureType(String insureType) {
		this.InsureType = insureType;
	}

	public void setSellerId(String sellerId) {
		this.SellerId = sellerId;
	}

	public String getFlagType() {
		return FlagType;
	}

	public void setFlagType(String flagType) {
		FlagType = flagType;
	}

	public void setSendTime(String sendTime) {
		this.SendTime = sendTime;
	}

	public void setStatus(String status) {
		this.Status = status;
	}

	public void setErrorMessage(String errorMessage) {
		this.ErrorMessage = errorMessage;
	}

	public String getVersion() {
		return Version;
	}

	public Integer getRequestType() {
		return RequestType;
	}

	public String getInsureType() {
		return InsureType;
	}

	public String getSellerId() {
		return SellerId;
	}

	public String getSendTime() {
		return SendTime;
	}

	public String getStatus() {
		return Status;
	}

	public String getErrorMessage() {
		return ErrorMessage;
	}

	public String getSessionId() {
		return SessionId;
	}

	public void setSessionId(String sessionId) {
		SessionId = sessionId;
	}

}
